import { AxiosPromise } from 'axios'
// @ts-ignore
import request from '/@/utils/request'

const prefix = '/api_dms/customer/'
// 登录
export const dmsLogin: (data: object) => AxiosPromise = (data: object) =>
  request('/api_dms/login', { data })

  // 新增
export const customerInsert: (data: object) => AxiosPromise = (data) =>
  request(`${prefix}insert`, { data })
// 列表
export const customerList: (data: object) => AxiosPromise = (data) =>
  request(`${prefix}list`, { data })
// 详情
export const customerInfo: (data: object) => AxiosPromise = (data) =>
  request(`${prefix}info`, { data })
//更新
export const customerUpdate: (data: object) => AxiosPromise = (data) =>
  request(`${prefix}update`, { data })
//删除
export const customerDelete: (data: object) => AxiosPromise = (data) =>
  request(`${prefix}delete`, { data })
// 分类
export const customerCategory: (data: object) => AxiosPromise = (data) =>
  request(`${prefix}category`, { data })

// 账户列表
export const customerAccounts: (data: object) => AxiosPromise = (data) =>
  request(`${prefix}accounts`, { data })
